From 9fec701806f4a61705e75fcee03d590f58562126 Mon Sep 17 00:00:00 2001 From: Keir Fraser Date: Thu, 25 Oct 2007 09:43:42 +0100 Subject: [PATCH] x86: GDTR must be reset after using real-mode BIOS services. Some BIOSes clobber GDTR. While we're here reset IDTR too, although it's not really necessary. Signed-off-by: John Byrne Sigend-off-by: Keir Fraser --- xen/arch/x86/boot/trampoline.S | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/xen/arch/x86/boot/trampoline.S b/xen/arch/x86/boot/trampoline.S index 95a9d013de..6ffaa811ef 100644 --- a/xen/arch/x86/boot/trampoline.S +++ b/xen/arch/x86/boot/trampoline.S @@ -168,6 +168,10 @@ trampoline_boot_cpu_entry: /* Disable irqs before returning to protected mode. */ cli + /* Reset GDT and IDT. Some BIOSes clobber GDTR. */ + lidt bootsym(idt_48) + lgdt bootsym(gdt_48) + /* Enter protected mode, and flush insn queue. */ xor %ax,%ax inc %ax -- 2.30.2